package view.component.weapon.charge_axe
{
	import feathers.controls.Label;
	
	import model.vo.weapon.ChargeAxeVo;
	
	import util.WeaponUtil;
	
	import view.component.weapon.BaseShortWeaponDetailView;
	
	
	/**
	 * 充能斧-详细信息界面
	 * @author £iang
	 * 
	 */	
	public class ChargeAxeDetailView extends BaseShortWeaponDetailView
	{
		//-----------------------------
		// variables
		//-----------------------------
		
		/** 装着瓶标题 */
		public var bottleTitle:Label;
		/** 装着瓶信息 */
		public var bottleLabel:Label;
		
		//-----------------------------
		// properties
		//-----------------------------
		
		//-----------------------------
		// setter&getter
		//-----------------------------
		
		//-----------------------------
		// methods
		//-----------------------------
		
		/**
		 * 初始化函数 
		 * 
		 */		
		override protected function initialize():void
		{
			super.initialize();
			bottleTitle = new Label();
			bottleTitle.text = "装着瓶：";
			mainSC.addChild( bottleTitle );
			
			bottleLabel = new Label();
			bottleLabel.textRendererProperties.isHTML = true;
			mainSC.addChild( bottleLabel );
		}
		
		/**
		 * 绘制函数 
		 * 
		 */		
		override protected function draw():void
		{
			super.draw();
			bottleTitle.x = 20 * this.dpiScale;
			bottleTitle.y = 300 * this.dpiScale;
			bottleLabel.x = 150 * this.dpiScale;
			bottleLabel.y = 300 * this.dpiScale;
			drawPart();
		}
		
		/**
		 * 设置充能斧数据 
		 * @param fluteVo 充能斧数据
		 * 
		 */		
		public function setChargeAxeData( chargeAxeVo:ChargeAxeVo ):void
		{
			setShortData( chargeAxeVo );
			bottleLabel.text = WeaponUtil.getChargeAxeBottleText( chargeAxeVo.bottle );
		}
		
		//-----------------------------
		// events
		//-----------------------------
		
		//-----------------------------
		// dispose
		//-----------------------------
		
		/**
		 * 析构函数 
		 * 
		 */		
		override public function dispose():void
		{
			bottleTitle.dispose(); bottleTitle = null;
			bottleLabel.dispose(); bottleLabel = null;
			super.dispose();
		}
		
		//-----------------------------
		// construction
		//-----------------------------
		
		/**
		 * 构造函数
		 *
		 */
		public function ChargeAxeDetailView()
		{
			super();
			weaponType = "charge_axe";
			insertOffset = 60;
		}
	}
}